<template>
<a-card class="container">
  <a-form
    id="components-form-demo-normal-login"
    :form="form"
    class="login-form"
    @submit="handleSubmit"
  >
    <a-form-item>
        <h1><b>E中人专家登录</b></h1>
      <a-input
        v-decorator="[
          'userName',
          { rules: [{ required: true, message: 'Please input your username!' }] },
        ]"
        placeholder="用户名"
      >
        <a-icon slot="prefix" type="user" style="color: rgba(0,0,0,.25)" />
      </a-input>
    </a-form-item>
    <a-form-item>
      <a-input
        v-decorator="[
          'password',
          { rules: [{ required: true, message: 'Please input your Password!' }] },
        ]"
        type="password"
        placeholder="密码"
      >
        <a-icon slot="prefix" type="lock" style="color: rgba(0,0,0,.25)" />
      </a-input>
    </a-form-item>
    <a-form-item>
        <router-link to="/lookblack">
      <a-button type="primary" html-type="submit" class="login-form-button">
        登录
      </a-button>
      </router-link>
    </a-form-item>
  </a-form>
</a-card>
</template>

<script>
export default {
  beforeCreate() {
    this.form = this.$form.createForm(this, { name: 'normal_login' });
  },
  methods: {
    handleSubmit(e) {
      e.preventDefault();
      this.form.validateFields((err, values) => {
        if (!err) {
          console.log('Received values of form: ', values);
        }
      });
    },
  },
};
</script>
<style>
.container{
  width: 500px;
  margin: 100px auto 0 !important;
  background-color: rgb(149, 208, 231)!important;
  
}
#components-form-demo-normal-login .login-form {
  max-width: 300px; 
}

#components-form-demo-normal-login .login-form-forgot {
  /* margin-right: 200px; */
  float: right;
}
#components-form-demo-normal-login .login-form-button {
  width: 100px;
}
</style>